GetComponent
It gets the component on a gameObj just like in Unity.
#
ExampleThe following example gets the InteractWeapon
component from variable self.gameObj
and stores it in interactWeapon
variable.
local interactWeapon = self.gameObj:GetComponent(typeof(CL.InteractWeapon))
#
User VariablesComponent | variable |
---|---|
GameObject | self.gameObj |